<?php 
$this->pageTitle=Yii::t('default',Yii::app()->name).' - '.Yii::t('user_messages','Reset password');
$this->breadcrumbs=array(
	Yii::t('user_messages','Reset password'),
);
?>

<h1><?php echo Yii::t('user_messages','Reset password'); ?></h1>

<?php if(Yii::app()->user->hasFlash('reset.success')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('reset.success');?>
</div>
<script type="text/javascript">
	setTimeout(function(){location.href="<?php echo  Yii::app()->getBaseUrl(true) ;?>/site/login"} , 3000);   
</script>
<?php else: ?>

<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
)); ?>


	<?php echo $form->errorSummary($model); ?>
	
	<?php echo  $form->textFieldControlGroup($model,'username',array(
			'labelOptions'=>array(
					'label'=>Yii::t('user_messages','reset.label'),
			),
			'span'=>4,'maxlength'=>128)); ?>
	<p class="help-block"><?php echo Yii::t('user_messages','reset.info'); ?></p>
	
	<div class="row buttons">
        <?php echo TbHtml::submitButton(Yii::t('default','Submit'),  array('color' => TbHtml::BUTTON_COLOR_PRIMARY,));?>
    </div>

<?php $this->endWidget(); ?>
</div><!-- form -->
<?php endif; ?>